<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>管理员管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__ADMIN__css/style.css"  media="all">
  <link rel="stylesheet" href="__ADMIN__layui/css/layui.css"  media="all">
</head>
<body>
<div class="pad-20">
  <fieldset class="layui-elem-field layui-field-title">
  <legend>管理员管理</legend>
  </fieldset>
  <form class="layui-form" action="" method="post" enctype="multipart/form-data">
    <!--基本信息-->
    <div class="layui-form-item">
      <label class="layui-form-label"><i class="layui-error-ts">*</i> 登录名</label>
      <div class="layui-input-block">
        <input class="layui-input" lay-verify="required" placeholder="请输入登录名" value="" type="text" name="data[username]">
      </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"><i class="layui-error-ts">*</i> 管理员组</label>
        <div class="layui-input-block">
          <select name="data[catid]" lay-verify="required">
            <option value="">请选择管理员组</option>
            <volist name="cateType" id="val">
            <option value="{$val['id']}">{$val['title']}</option>
            </volist>
          </select>
        </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label"><i class="layui-error-ts">*</i> 密码</label>
      <div class="layui-input-block">
        <input class="layui-input" lay-verify="newPwd"  placeholder="请输入密码，6到16个字符，登录密码即为锁屏密码" value="" type="password" name="data[userpwd]">
      </div>
    </div>
    <div class="layui-form-item upload-row">
      <label class="layui-form-label">头像</label>
      <div class="layui-input-inline" style="width:720px;">
        <input class="layui-input" name="data[headimg]" placeholder="请选择文件上传" type="text" value="" readonly="" style="width:600px;display:inline-block;">
        <button type="button" class="layui-btn buttonup"><i class="layui-icon">&#xe67c;</i>文件浏览</button>
        <notempty name="info['id']"><button type="button" class="layui-btn  open-file"><i class="layui-icon">&#xe64a;</i>  查看文件</button></notempty>
      </div>
      <div class="layui-form-mid layui-word-aux">建议尺寸大小：100*100PX</div>

    </div>
    <div class="layui-form-item">
      <label class="layui-form-label"> 手机</label>
      <div class="layui-input-block">
        <input class="layui-input" lay-verify="required" placeholder="请输入手机" value="" type="text" name="data[telphone]">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label"> 邮箱</label>
      <div class="layui-input-block">
        <input class="layui-input" lay-verify="required" placeholder="请输入邮箱" value="" type="text" name="data[email]">
      </div>
    </div>
    <!--基本信息-->
    <div class="layui-form-item">
      <div class="layui-input-block">
        <input type="hidden" name="id" value="">
        <button class="layui-btn" lay-submit="" lay-filter="addNews">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
  </form>
</div>
<div class="yzui-filler"></div>
<script src="__ADMIN__js/jquery-1.9.1.min.js" charset="utf-8"></script>
<script type="text/javascript" src="__COMMON__ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__COMMON__ueditor/ueditor.all.js"></script>
<script src="__ADMIN__layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript">
  layui.use(['form', 'layedit', 'laydate'], function(){
    var form = layui.form
    ,layer = layui.layer
    ,layedit = layui.layedit
    ,laydate = layui.laydate;
    //添加验证规则
    form.verify({
      newPwd : function(value, item){
        if(value.length < 6){
          return "密码长度不能小于6位";
        }
      },

    });
  });
  layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element;
  });
  $(function(){
    // 文件上传
    $(".upload-row").each(function(i){
      $(this).find(".buttonup").click(function(){
        window.open('{:U('Tool/uploadImage', '', '')}?id='+ i, '文件上传', 'height=100, width=400, top='+(screen.availHeight-100)/2+', left='+(screen.availWidth-400)/2+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
      });
    });
  });
</script>
</body>
</html>
